The present invention relates to code scanning devices and, in particular, to apparatus and methods for restoring a code from differing code fragments.
Well known equipment exists for reading a bar code that is printed on a package. Bar codes on merchandise may be scanned at the point of sale to identify the goods and correlate them to a price. Such equipment is commonly used at supermarket checkout counters.
A basic principle conventionally applied in bar code scanning is that of detecting reflected light contrasts. A source of illumination such as a low powered helium neon laser, can produce a beam which is moved across the bar code. Dark areas (bars) absorb laser light, whereas light areas (spaces) reflect light that is subsequently detected by the scanner.
Optics are used to xe2x80x9cmovexe2x80x9d a laser beam. Without these optics, the laser beam appears as a dot. When the optics are used, the beam appears as a line of laser light. This is defined as moving-beam scanning. As the moving beam xe2x80x9ctravelsxe2x80x9d across the conveyor (or area to be scanned for a code, commonly called the scanning zone) any light or dark transitions are detected and converted to a digital signal known as code. A valid bar code consists of a defined number of light and dark transitions with correct ratios between the wide and narrow intervals.
Existing codes consist of a series of parallel bars separated by spaces. The bars and spaces are printed at either a full width or half width. The bars and spaces may signify a bit pattern wherein wide spaces or bars are denominated a xe2x80x9conexe2x80x9d while narrow spaces and bars are denominated a xe2x80x9czeroxe2x80x9d (or vice versa).
A basic objective in known bar code scanning is laying down a trace that is dense and varied enough to ensure that at least one scan will recover a complete bar code. The denser the scanning, the more rapidly scanning must occur and, therefore, a higher demand is placed upon the circuitry processing the scanned data.
Known equipment (for example, U.S. Pat. No. 3,728,677) employs a mirrored wheel having a polygonal periphery. Rotation of the mirrored wheel scans a laser beam across two azimuthally spaced mirrors which deflect the beam downwardly to trace an xe2x80x9cXxe2x80x9d shaped pattern.
Other known equipment has used prisms, mirrors, vidicons, or other apparatus to turn the scan direction of an optical code scanning system. (See, for example, U.S. Pat. Nos. 3,663,800; 3,774,014; 3,800,282; 3,902,047; and 4,064,390).
It is also known (U.S. Pat. No. 3,906,203) to scan a bar code and measure its interval widths by recording the time required to traverse each interval. The successive interval widths are multiplied by three, five, and eight. By storing and comparing the multiplied widths of successive scans, the equipment can determine whether the latest interval is about the same size as, or much smaller or larger than, the prior interval. This equipment, however, performs a relatively coarse comparison and will accept as valid, scan times that are excessively short or long.
Accordingly there is a need for a code scanner that does not require support from extraordinarily high speed circuitry, but yet has a high probability of obtaining a complete code when an object passes by the scanner.
In accordance with the principles of the present invention, a scanner is provided for reading machine-readable code on an object. The scanner includes a scanning means, a data means, and a registration means. The scanning means can repetitively scan the code and provide a scan signal repetitively corresponding to at least fragments of the code. The data means is coupled to the scanning means and responds to its scan signal for repetitively storing the scan signal. The registration means is coupled to the data means for reconstructing the code from at least two of the fragments of the code, by relatively shifting them until they are in registration. Thus, one of the fragments provides a first portion of the code and the other a second portion. Both fragments provide a registered middle portion of the code.
In accordance with the principles of the same invention, a related method is provided for reading machine-readable code on an object. The method includes repetitively scanning the code and obtaining at least fragments of the code. Another step is repetitively recording the fragments of the code. The method also includes the step of reconstructing the code from at least two of the fragments of the code, by relatively shifting them until they are in registration. Thus, one of the fragments provides a first portion of the code and the other a second portion, both providing a registered middle portion of the code.
By employing methods and apparatus of the foregoing type, an improved scanner is provided. In a preferred embodiment, the scanner can begin operation when an object passes a checkpoint. Preferably, an optical scanner measures the distance between transitions from light to dark and dark to light. These distances between transitions are assigned numeric values based upon a timing process. A preferred xe2x80x9cdigital filterxe2x80x9d compares the numeric values of successive interval widths. Depending upon the pattern of the interval widths, a pattern detecting process determines whether the measured widths are to be considered wide or narrow. For example, a ratio test may be used to determine if the widths ar part of a pattern that may be a segment to a bar code.
All segments of xe2x80x9cnxe2x80x9d transitions (a value that can be set by software) or more that pass this ratio test are stored as a pattern of wide and narrow values for a subsequent reconstruction process. Patterns of less than five transitions are rejected. If no pattern has a code that is sufficiently long to be considered valid, the preferred apparatus attempts to reconstruct code fragments into a complete bar code pattern. The fragments are compared to each other in consecutive order. The fragments are overlaid, shifting each subsequent segment until the wide and narrow patterns of the segments match or register. When a complete bar code pattern has been reconstructed from two or more fragments, a microprocessor can decode the reconstructed bar code and verify that its checksum is valid.
In a preferred embodiment, the code is scanned optically by a pattern of staggered xe2x80x9cXxe2x80x9d shaped traces. These staggered scans may be centered at the vertices of a triangle. By using three xe2x80x9cXxe2x80x9d shaped patterns a pattern of modest complexity is used, which has a high probability of obtaining a full bar code. But if only a fragment of a bar code need be obtained, the probability is nonetheless high that subsequent fragments will be able to reconstruct the full bar code.